import request from '@/utils/request'

// 列表
export function getMessageList (params) {
  return request({
    url: '/v1/message2/list',
    method: 'get',
    params
  })
}

// 新增
export function addMessage (data) {
  return request({
    url: '/v1/message2/create',
    method: 'post',
    data
  })
}

// 更新
export function updateMessage (id, data) {
  return request({
    url: `/v1/message2/${id}/update`,
    method: 'post',
    data
  })
}

// 删除
export function deleteMessage (id) {
  return request({
    url: `/v1/message2/${id}`,
    method: 'delete'
  })
}

// 详情
export function getMessageDetailById (id) {
  return request({
    url: `/v1/message2/${id}/detail`,
    method: 'get'
  })
}
